<?php

declare(strict_types=1);

use Hyperf\Database\Seeders\Seeder;

class UserSeeder extends Seeder
{
    /**
     * Run the database seeds.
     *
     * @return void
     */
    public function run()
    {
        $count = 100;

        $faker = Faker\Factory::create();
        for ($i = 0; $i < $count; $i++) {
            \App\Model\User::create(
                [
                    'nickname' => $faker->name,
                    'phone' => $faker->e164PhoneNumber,
                    'status' => $faker->randomElement([0,1])
                ]
            );
        }
    }
}
